select option in reactive forms

110

select option in reactive forms -

<select class="custom-select" (change)="changeCity($event)" formControlName="cityName">
   <option value="" disabled>Choose your city</option>
   <option *ngFor="let city of City" [ngValue]="city">{{city}}</option>
</select>

select option in reactive forms -

// City Names
  City: any = ['Florida', 'South Dakota', 'Tennessee', 'Michigan']

Comments

Submit
0 Comments